package com.ming.javaweb.service.impl;

import com.ming.javaweb.beans.entity.AdminDO;
import com.ming.javaweb.dao.AdminDao;
import com.ming.javaweb.dao.impl.AdminDaoImpl;
import com.ming.javaweb.service.AdminService;

import java.sql.SQLException;

public class AdminServiceImpl implements AdminService {

    private AdminDao adminDao = new AdminDaoImpl();

    @Override
    public AdminDO validateLogin(String userName) throws SQLException {

        return adminDao.validateLogin(userName);
    }

    @Override
    public void register(AdminDO adminDO) throws SQLException {
        adminDao.register(adminDO);
    }
}
